chore: Describe RBAC rules, remove unnecessary rules#674
Merged
NickLarsenNZ merged 15 commits intomainfrom Apr 8, 2026
Merged
Conversation
18 tasks
Required for startup condition regardless of CRD maintenance
The operator creates and patches events, not the product pods.
…rrole All other operators have it only for the product clusterrole(s).
This comment was marked as resolved.
This comment was marked as resolved.
Member
Author
|
NickLarsenNZ
commented
Apr 8, 2026
NickLarsenNZ
commented
Apr 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of stackabletech/issues#798
Note
This was initially generated by a coding assistant to see how well it can inspect code and review the RBAC rules. the changes will be properly checked before reviews are requested.
Split operator and product roles into separate filesAlready splitRules Removed in This Branch
Operator ClusterRole (
roles.yaml)nodeslist+watch - onlynodes/proxyget is needed for cluster domain detectionpersistentvolumeclaims- entire rule removed; the operator doesn't manage PVCs directlyendpoints- removed; no references in the operator code, was a copy-paste inclusionstatefulsetsrule:deploymentsresource removed - no references in the operator code, was a copy-paste inclusioncustomresourcedefinitionsget verb - list+watch are always present; create+patch remain conditionalsecurity.openshift.io/securitycontextconstraintsuse - copy-paste error; only the product pods need thissecrets- entire resource removed; the operator references secrets by name in pod specs (secret class volumes, image pull secrets) but never calls the Kubernetes API to get/create/manage Secret objects directly - the secret-operator handles thatdeletecollectionremoved from all rules - orphan cleanup uses individual deletes, not bulk deletes; no references in the operator codecreateandpatchremoved frompods- the operator only watches and deletes driver pods; it creates Jobs and StatefulSets which in turn create podsupdateverb removed from all rules - the operator exclusively uses Server-Side Apply (patch);update(HTTP PUT) is never calledwatchremoved fromrolebindings,poddisruptionbudgets,listeners- none of these are registered with.owns()so no controller sets up a watch on themwatch,delete,get,listremoved fromjobs- Jobs are only created via SSA; never tracked for orphan cleanup or watched. Job completion is detected by the pod-driver controller watching driver pods for terminal phases (Succeeded/Failed), not by watching the Job itself. Cleanup of the Job and its pods is left to Kubernetes TTL (ttlSecondsAfterFinished) or manual action.patchremoved fromsparkapplications,sparkhistoryservers,sparkconnectservers,sparkapptemplates- the operator only patches their/statussubresources, not the main resourcesSpark Driver + Connect Server ClusterRoles
serviceaccountsresource - Spark uses an existing ServiceAccount for executors but doesn't create themevents.k8s.iocreate rule removed - not usedHistory Server ClusterRole
configmaps,persistentvolumeclaims,pods,secrets,serviceaccounts,services(all verbs) - the History Server reads event logs from S3/HDFS via mounted volumes and makes no Kubernetes API calls at runtimeevents.k8s.iocreate rule removed - same reason